<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="org.apache.log4j.Logger" %>
<%@ page import="yh.core.util.YHUtility" %>
<%@ page import="yh.core.servlet.YHServletUtility" %>
<%@ page import="yh.core.global.YHActionKeys" %>
<%@ page import="yh.core.global.YHConst" %>
<%@ page import="yh.core.global.YHSysProps" %>
<%@ page import="yh.core.global.YHSysPropKeys" %>
<%@ page import="yh.core.funcs.person.data.YHPerson" %>
<%
  String contextPath = request.getContextPath();
  if (contextPath.equals("")) {
    contextPath = "/project";
  }
  String limitUploadFiles  = YHSysProps.getProp("limitUploadFiles");
  String useSearchFunc = YHSysProps.getProp("useSearchFunc");
  String isDev = YHSysProps.getProp("isDevelopContext"); 
  if (YHUtility.isNullorEmpty(isDev)) { 
    isDev = "0"; 
  }
  //获取主题的索引号
  int styleIndex = 1;
  Integer styleInSession = (Integer)request.getSession().getAttribute("STYLE_INDEX");
  if (styleInSession != null) {
    styleIndex = styleInSession;
  }
  
  
  String stylePath = contextPath + "/core/styles/style" + styleIndex;
  String imgPath = stylePath + "/img";
  String cssPath = stylePath + "/css";
  
  String oaStyle = (String)request.getSession().getAttribute("OA_STYLE");
  if(YHUtility.isNullorEmpty(oaStyle)){
    oaStyle = "1";
  }
  String cssPathOA = contextPath + "/core/frame/5/styles/style"+oaStyle+"/css";
  String fullContextPath = YHServletUtility.getWebAppDir(this.getServletConfig().getServletContext());
%>
<script type="text/javascript">
var classid = '';
var MakerCaption= '';
var MakerKey='';
var ProductCaption='';
var ProductKey='';
var fclassid='';
var userAgent = navigator.userAgent, 
				rMsie = /(msie\s|trident.*rv:)([\w.]+)/, 
				rFirefox = /(firefox)\/([\w.]+)/, 
				rOpera = /(opera).+version\/([\w.]+)/, 
				rChrome = /(chrome)\/([\w.]+)/, 
				rSafari = /version\/([\w.]+).*(safari)/;
				var browser;
				var version;
				var ua = userAgent.toLowerCase();
				function uaMatch(ua) {
					var match = rMsie.exec(ua);
					if (match != null) {
						return { browser : "IE", version : match[2] || "0" };
					}
					var match = rFirefox.exec(ua);
					if (match != null) {
						return { browser : match[1] || "", version : match[2] || "0" };
					}
					var match = rOpera.exec(ua);
					if (match != null) {
						return { browser : match[1] || "", version : match[2] || "0" };
					}
					var match = rChrome.exec(ua);
					if (match != null) {
						return { browser : match[1] || "", version : match[2] || "0" };
					}
					var match = rSafari.exec(ua);
					if (match != null) {
						return { browser : match[2] || "", version : match[1] || "0" };
					}
					if (match != null) {
						return { browser : "", version : "0" };
					}
				}
				var browserMatch = uaMatch(userAgent.toLowerCase());
				if (browserMatch.browser) {
					browser = browserMatch.browser;
					version = browserMatch.version;
				}
/** 常量定义 **/
var TDJSCONST = {
  YES: 1,
  NO: 0
};
/** 变量定义 **/
var contextPath = "<%=contextPath%>";
var imgPath = "<%=imgPath%>";
var ssoUrlGPower = "";
var limitUploadFiles = ""
var signFileServiceUrl = "";
var isOnlineEval = "";
var useSearchFunc = "";
var maxUploadSize = 0;
var isDev = "";
var ostheme = "";
function getEvent() //同时兼容ie和ff的写法
{
    if(document.all)  return window.event;
    func=getEvent.caller;
    while(func!=null){
        var arg0=func.arguments[0];
        if(arg0)
        {
          if((arg0.constructor==Event || arg0.constructor ==MouseEvent) || (typeof(arg0)=="object" && arg0.preventDefault && arg0.stopPropagation))
          {
          return arg0;
          }
        }
        func=func.caller;
    }
    return null;
}
</script>